#include "A.h"
#include <iostream>
#include <vector>
#include "T3_LenStr.h"

using namespace std;

ListNode *generateListNode(std::vector<int> vals);
void freeListNode(ListNode *head);
void printListNode(ListNode *head);

ListNode *generateListNode(std::vector<int> vals)
{
        ListNode *res = nullptr;
        ListNode *last = nullptr;
        for (auto val : vals)
        {
                if (last)
                {
                        last->next = new ListNode(val);
                        last = last->next;
                }
                else
                {
                        res = new ListNode(val);
                        last = res;
                }
        }
        return res;
}

void printListNode(ListNode *head)
{
        ListNode *node = head;
        while (node)
        {
                std::cout << node->val << ",";
                node = node->next;
        }
        std::cout << std::endl;
}

void freeListNode(ListNode *head)
{
        ListNode *node = head;
        while (node)
        {
                auto temp = node->next;
                delete node;
                node = temp;
        }
}

int main(void)
{
        cout<<11<<endl;

        
        // Solution9 s9;
        // s9.TestIsPlindrome();


        // Solution8 s8;
        // string st = " 123 world";
        // int it = s8.myAtoi(st);
        // cout<<it<<endl;

        // Solution7 s7;
        // int tmp=98665;
        // int res=s7.reveres(tmp);
        // cout<<res<<endl;
        // Solution6 s6;
        // string tmps = "PAYPALISHIRING";
        // s6.convert(tmps, 4);

        // Solution3 s3;
        // string tmps = "pwwkew";
        // int result=s3.lengthOfLongestSubstring(tmps);
        // std::cout<<"result:"<<result<<endl;
        // auto list1 = generateListNode({1, 4, 6});
        // auto list2 = generateListNode({9, 4, 6});
        // printListNode(list1);
        // printListNode(list2);
        // Solution s;
        // auto sum = s.addTwoNumbers(list1, list2);
        // printListNode(sum);

        //   A *a = new A();
        //a->Say();

        //------------------------------L1--------------------------
        // while (1)
        // {
        // cout<<"#############"<<endl;
        // a->L1TwoSum();
        // }

        //------------------------------L1--------------------------
        //  vector<int> ns={2,7,11,15};
        // a->TwoSum(ns,22);

        //a->L2LinkSum();

        return 0;
}